﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _14_ArithmeticMethods
{
    class Program
    {
        static int Sum(params int[] array)
        {
            int sumContainer = 0;
            for (int index = 0; index < array.Length; index++)
            {
                sumContainer += array[index];
            }
            return sumContainer;
        }

        static int Product(params int[] array)
        {
            int productContainer = 1;
            for (int index = 0; index < array.Length; index++)
            {
                productContainer *= array[index];
            }
            return productContainer;
        }

        static int Min(params int[] array)
        {
            return array.Min();
        }

        static int Max(params int[] array)
        {
            return array.Max();
        }

        static double Average(params int[] array)
        {
            return array.Average();
        }

        static void Main(string[] args)
        {
            Console.WriteLine(Sum(1, 2, 3, 4, 5));
            Console.WriteLine(Product(1, 2, 3, 4, 5));
            Console.WriteLine(Min(1,2,0,3,4,5,6));
            Console.WriteLine(Average(1,2,3,4,5));

        }
    }
}
